package com.example.questionnaires.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("question")
public class Question {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long questionnaireId;
    private String title;
    private Integer type;  // 1: 单选题 2: 多选题 3: 填空题
    private Integer required;  // 0: 非必填 1: 必填
    @TableField("sort")
    private Integer sort;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private Boolean deleted;

    @TableField(exist = false)
    private List<Option> options;
} 